﻿using System;
using System.Net;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;

namespace bdnt_pets_system_Entity
{
    [DataContract]
    public class Tbl_FailureRecord : INotifyPropertyChanged
    {
        bool isValidate = true;
        [DataMember]
        public bool IsValidate
        {
            get { return isValidate; }
            set { isValidate = value; }
        }
        Int32 id;
        [DataMember]
        public Int32 Id
        {
            get { return id; }
            set { id = value; }
        }

        DateTime? recordTime;
        /// <summary>
        /// 记录日期
        /// </summary>
        [DataMember]
        public DateTime? RecordTime
        {
            get { return recordTime; }
            set { recordTime = value; }
        }

        Int32 recordUserId;
        /// <summary>
        /// 记录人
        /// </summary>
        [DataMember]
        public Int32 RecordUserId
        {
            get { return recordUserId; }
            set { recordUserId = value; }
        }

        string recordUserName;
        [DataMember]
        public string RecordUserName
        {
            get { return recordUserName; }
            set { recordUserName = value; }
        }

        string productionNo;
        /// <summary>
        /// 车辆生产流水号
        /// </summary>
        [DataMember]        
        public string ProductionNo
        {
            get { return productionNo; }
            set
            { 
                productionNo = value;
            }
        }

        string vINNo;
        /// <summary>
        /// 车架号
        /// </summary>
        [DataMember]        
        public string VINNo
        {
            get { return vINNo; }
            set
            {
                
                vINNo = value;
            }
        }

        string partNo;
        /// <summary>
        /// 部件编号
        /// </summary>
        [DataMember]
        public string PartNo
        {
            get { return partNo; }
            set { partNo = value; }
        }

        string partName;
        [DataMember]
        public string PartName
        {
            get { return partName; }
            set { partName = value; }
        }

        string en_partName;
        [DataMember]
        public string en_PartName
        {
            get { return en_partName; }
            set { en_partName = value; }
        }

        string positionNo;
        /// <summary>
        /// 位置编号
        /// </summary>
        [DataMember]
        public string PositionNo
        {
            get { return positionNo; }
            set { positionNo = value; }
        }
        string positionName;
        [DataMember]
        public string PositionName
        {
            get { return positionName; }
            set { positionName = value; }
        }
        string en_positionName;
        [DataMember]
        public string en_PositionName
        {
            get { return en_positionName; }
            set { en_positionName = value; }
        }
        Int32 failureId;
        /// <summary>
        /// 故障编号
        /// </summary>
        [DataMember]
        public Int32 FailureId
        {
            get { return failureId; }
            set { failureId = value; }
        }

        bool repairStatus;
        /// <summary>
        /// 是否返修
        /// </summary>
        [DataMember]
        public bool RepairStatus
        {
            get { return repairStatus; }
            set { repairStatus = value; }
        }

        string fepairResult = "0";
        /// <summary>
        /// 返修结果
        /// </summary>
        [DataMember]
        public string RepairResult
        {
            get { return fepairResult; }
            set { fepairResult = value; }
        }

        Int32 repsPersonId;
        /// <summary>
        /// 返修人编号
        /// </summary>
        [DataMember]
        public Int32 RepsPersonId
        {
            get { return repsPersonId; }
            set { repsPersonId = value; }
        }
        string repsPersonName;
        /// <summary>
        /// 返修人名称
        /// </summary>
        [DataMember]
        public string RepsPersonName
        {
            get { return repsPersonName; }
            set { repsPersonName = value; }
        }

        DateTime? repsData;
        /// <summary>
        /// 返修日期
        /// </summary>
        [DataMember]
        public DateTime? RepsData
        {
            get { return repsData; }
            set { repsData = value; }
        }

        bool trackingFlag;
        /// <summary>
        /// 是否加入追踪中心
        /// </summary>
        [DataMember]
        public bool TrackingFlag
        {
            get { return trackingFlag; }
            set { trackingFlag = value; }
        }

        string failureName;
        [DataMember]
        public string FailureName
        {
            get { return failureName; }
            set { failureName = value; }
        }

        string en_failureName;
        [DataMember]
        public string en_FailureName
        {
            get { return en_failureName; }
            set { en_failureName = value; }
        }


        Int32 failureLevel;
        /// <summary>
        /// 故障等级(0低，1中，2高)
        /// </summary>
        [DataMember]
        public Int32 FailureLevel
        {
            get { return failureLevel; }
            set { failureLevel = value; }
        }

        Int32 recordShift;
        /// <summary>
        /// 1,2 班组（上午下午:20120603-1 /20120603-2）
        /// </summary>
        [DataMember]
        public Int32 RecordShift
        {
            get { return recordShift; }
            set { recordShift = value; }
        }

        Int32 checkerUserId;
        /// <summary>
        /// 检测人编号
        /// </summary>
        [DataMember]
        public Int32 CheckerUserId
        {
            get { return checkerUserId; }
            set { checkerUserId = value; }
        }

        string checkerUserName;
        /// <summary>
        /// 检测人名称
        /// </summary>
        [DataMember]
        public string CheckerUserName
        {
            get { return checkerUserName; }
            set { checkerUserName = value; }
        }

        DateTime? checkTime;
        /// <summary>
        /// 检测日期
        /// </summary>
        [DataMember]
        public DateTime? CheckTime
        {
            get { return checkTime; }
            set { checkTime = value; }
        }

        string repairResultText;
        [DataMember]
        public string RepairResultText
        {
            get { return repairResultText; }
            set { repairResultText = value; }
        }

        string en_repairResultText;
        [DataMember]
        public string en_RepairResultText
        {
            get { return en_repairResultText; }
            set { en_repairResultText = value; }
        }

        Int32 fCount;
        [DataMember]
        public Int32 FCount
        {
            get { return fCount; }
            set { fCount = value; }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string PropName)
        {
            if (PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(PropName));
            }
        }
    }
}
